package com.mdd.common.plugin.ai.request;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author XYueong
 * @date 2023-12-05
 * @description: chatGpt请求
 */
@Data
public class ChatGptRequest implements Serializable {


    private List<Messages> messages;

    //这里默认为"gpt-3.5-turbo"
    private String model = "gpt-3.5-turbo";


    @Data
    public static class Messages {
        public Messages(String content) {
            this.role = RoleModel.USER;  // 默认使用 "system"
            this.content = content;
        }

        private String role;
        private String content;

        public static class RoleModel {
            public static final String SYSTEM = "system";
            public static final String USER = "user";
        }

    }
}


